package com.bricker.laboratorymanagement.business.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.bricker.laboratorymanagement.business.entity.ExType;
import com.bricker.laboratorymanagement.business.service.ExTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/exType")
public class ExTypeController {
    @Autowired
    private ExTypeService exTypeService;

    /**
     * 获取实验项目分类列表
     * @return
     */
    @GetMapping
    public List<ExType> getExType(){
        List<ExType> exTypes = exTypeService.list(Wrappers.<ExType>lambdaQuery().eq(ExType::getDelFlag,"0"));
        return  exTypes;
    }
}
